home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-01-31 | 1.1 KB | 53 lines | [TEXT/MPS ] |
- !!MP Inlines.f
-
- C An example of a FORTRAN Resource for Microsoft Excel 3.0
- C This example call illustrates the use of the Passing a Pointer to an
- C Array Structure, Data Type K. Testing for this example was done with
- C Language Systems FORTRAN version 3.0
- C
- C Below are the commands that were executed to create the
- C code resource
-
- !!IFC FALSE
- FORTRAN DATAK1.f -opt=1 -noimplicit
- Link -w -f -srt -ad 4 -t '????' -c '????' ∂
- -m DATAK1 -sn Main=DATAK1 ∂
- -sn f_RunTime=DATAK1 ∂
- -sn f_Intrinsics=DATAK1 ∂
- DATAK1.f.o ∂
- "{FLibraries}"OutpwStubs.o ∂
- "{Libraries}"Runtime.o ∂
- "{Libraries}"Interface.o ∂
- "{FLibraries}"FORTRANlib.o ∂
- "{FLibraries}"IntrinsicLib.o ∂
- "{FLibraries}"FSANELib.o ∂
- -o DATAK1.rsc
- !!ENDC
-
- C Source code
-
- integer*4 function DATAK1(%val(a),%val(value))
-
- integer*2 i, items
-
- pointer /real*8/ value
- structure /fp/
- integer*2 rows
- integer*2 columns
- real*8 dparray(100)
- end structure
-
- pointer /fp/ a
-
- value^ = 0
- items = a^.rows * a^.columns
- do i = 1,items
- value^ = value^ + a^.dparray(i)
- enddo
- DATAK1 = value
-
- return
- end
-
-
-